#! /usr/bin/env python
"""
This code calculate measure the bimodal feature around a given sky position based on the SDSS DR8 data. 

Created by: Jiangang Hao @ FNAL, 3/21/2013

"""

import sys

if len(sys.argv) == 1:
    print 'syntax: clusterGazer ra dec photoz'
    print ' ---    photoz is a test photoz you input, the algorithm will'
    print ' ---    iterate to get a photoz by fitting the red sequence'
else:
    import richDr8Iter as rh
    ra = float(sys.argv[1])
    dec = float(sys.argv[2])
    photoz = float(sys.argv[3])
    try:
	t=rh.getRichness(ra,dec,photoz)	
	rh.pl.show()
	raw_input('---hit enter to go on --')
    except:
        print '--- Position is not available ! --'    

